package com.notes.aop;

import com.notes.aop.pojo.Car;
import com.notes.aop.pojo.Student;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * @author tiny
 * @date 2021/10/12 22:05
 * @Description:
 */
@Component
@Aspect
public class LogAspect {
    private Logger logger = LoggerFactory.getLogger(LogAspect.class);

    @Before("execution(public * com.notes.aop.DemoClass.service(..)) && args(student,car)")
    public void log(Student student, Car car){
        logger.info("=============================================before方法执行中=============================================");
    }


}
